package com.gibs.peixunapi.model;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import java.util.Date;
import java.util.List;

/**
 * @author liangjiawei
 */
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
//@Table(name = "Notice")
public class Notice extends BaseModel {	//消息通知
	private String title;     //标题
	@ManyToOne(cascade = CascadeType.REFRESH)
	private User sender;     //发布人
	@ManyToMany(cascade = CascadeType.REFRESH)//TODO
	private List<User> accepter;     //接收人
	private Date sendDate;     //发布时间
	private String content;     //内容

}

